import 'package:flutter_test/flutter_test.dart';
import 'package:t3_route_audio_monitor/t3_route_audio_monitor.dart';
import 'package:t3_route_audio_monitor/t3_route_audio_monitor_platform_interface.dart';
import 'package:t3_route_audio_monitor/t3_route_audio_monitor_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockT3RouteAudioMonitorPlatform
    with MockPlatformInterfaceMixin
    implements T3RouteAudioMonitorPlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');
}

void main() {
  final T3RouteAudioMonitorPlatform initialPlatform = T3RouteAudioMonitorPlatform.instance;

  test('$MethodChannelT3RouteAudioMonitor is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelT3RouteAudioMonitor>());
  });

  test('getPlatformVersion', () async {
    T3RouteAudioMonitor t3RouteAudioMonitorPlugin = T3RouteAudioMonitor();
    MockT3RouteAudioMonitorPlatform fakePlatform = MockT3RouteAudioMonitorPlatform();
    T3RouteAudioMonitorPlatform.instance = fakePlatform;

    expect(await t3RouteAudioMonitorPlugin.getPlatformVersion(), '42');
  });
}
